Abstract Motion detection, a fundamental computation of the visual system, begins in the retina. In the mammalian retina, the direction of moving objects is computed by the direction-selective circuit. The retinal output of this circuit is provided by direction-selective ganglion cells (DSGCs). These cells are strongly activated by motion in their preferred direction, but are suppressed by motion in the opposite, or ?null?, direction. They report the direction of motion to higher brain centers for further visual processing, and they contribute to the control of eye movements and conscious vision. Besides their direction selectivity, DSGC responses are prominently influenced by the context of visual environments. These context-dependent properties are central to the motion encoding by DSGCs in the natural environment. This proposal aims to address two important context-dependent circuit functions pertinent to naturalistic stimuli. The first one is noise resilience. Motion in natural scenes is often accompanied by the presence of other visual features or ?noise?. Aim 1 will determine circuit mechanisms that preserve direction selectivity in the presence of background noise. The second function is the encoding of motion contrast. Due to constant body and eye movements, visual inputs on the retina are composites of global image shifts and relative motion between moving objects and their backgrounds. DSGC responses are not only direction-selective, but also sensitive to relative motion compared to global motion. Aim 2 will determine the circuit motifs that confer DSGCs sensitivity to motion contrast. In Aim 3, we will link the algorithmic functions of experimentally defined circuit motifs to the encoding performance of DSGCs to naturalistic motion stimuli. Our proposed work combining functional, connectomic, computational and theoretical approaches is expected to produce a multi-layered circuit model that dynamically engages distinct circuit components for context-dependent processing of naturalistic motion, a dramatic departure from the current static circuit model of retinal feature selectivity. Since the connectivity patterns in the retina consist of canonical circuit motifs that recur across brain regions and animal species, our study will provide insights into the general principles of neural computation by the algorithmic functions of elementary circuit motifs.